#!/home/bin/python
print "Content-Type: text/html\n"
print "<meta http-equiv='Content-Type' content='text/html; charset=euc-kr' />"

import cgi
import cgitb
import os
import time
import baseball

cgitb.enable()

if __name__ == '__main__':
    form = cgi.FieldStorage()
    ip = cgi.escape(os.environ["REMOTE_ADDR"])
    id = form["id"].value

    if form.has_key("inn"):
        inn = form["inn"].value
        print baseball.find_relay(id, inn)
    else:
        print baseball.find_relay(id)


# vim:set filetype=python: 
